package com.yami.shop.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.bean.model.HotCity;
import com.yami.shop.dao.HotCityMapper;
import com.yami.shop.service.HotCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chiley
 * @date 2022-12-01 14:02:57
 */
@Service
public class HotCityServiceImpl extends ServiceImpl<HotCityMapper, HotCity> implements HotCityService {

    @Autowired
    private HotCityMapper hotCityMapper;


    @Override
    @Cacheable(cacheNames = "HotCityList")
    public List<HotCity> listHotCity() {
        return hotCityMapper.listHotCity();
    }

    @Override
    @CacheEvict(cacheNames = "HotCityList")
    public void removeHotCityList() {
    }
}
